#ifndef FPNUMBER_H
#define FPNUMBER_H
#include <iostream>
using namespace std;

class FPNumber {
public:
	static const char maxP = 52;
	FPNumber(const FPNumber&);
	FPNumber(char);
	FPNumber(double = 0.0, char = 52);
	FPNumber& operator+=(FPNumber);
	FPNumber& operator-=(FPNumber);
	FPNumber& operator*=(FPNumber);
	FPNumber& operator/=(FPNumber);
	FPNumber& operator^=(FPNumber);
	FPNumber operator+(FPNumber) const;
	FPNumber operator-(FPNumber) const;
	FPNumber operator*(FPNumber) const;
	FPNumber operator/(FPNumber) const;
	FPNumber operator^(FPNumber) const;
	bool operator==(FPNumber) const;
	bool operator!=(FPNumber) const;
	bool operator<(FPNumber) const;
	bool operator<=(FPNumber) const;
	bool operator>(FPNumber) const;
	bool operator>=(FPNumber) const;
	friend ostream& operator<<(ostream&,FPNumber);
	friend istream& operator>>(istream&,FPNumber);
	char prec() const;
	double asDouble() const;
private:
	void trunc();
	double v;
	char p;
};

#endif
